//package org.summerframework.component.mybites.config;
//
//import com.alibaba.druid.pool.DruidDataSource;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
//import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//
///**
// * @author 石超
// * @version v1.0.0
// */
//@Configuration
//@ConditionalOnClass(DruidDataSource.class)
//@ConditionalOnMissingBean(DataSource.class)
//@ConditionalOnProperty(name = "spring.datasource.type",
//        havingValue = "com.alibaba.druid.pool.DruidDataSource", matchIfMissing = true)
//@EnableConfigurationProperties(DataSourceProperties.class)
//public class DruidDataSourceConfiguration {
//
//    @Bean("dataSource")
//    @ConfigurationProperties(prefix = "spring.datasource.druid")
//    public DruidDataSource druidDataSource(DataSourceProperties dataSourceProperties) {
//        return dataSourceProperties.initializeDataSourceBuilder().type(DruidDataSource.class).build();
//    }
//}
